CS 302 Data Structures Spring 2010

نویسنده

  • George Bebis
چکیده

(d) Suppose list1 contains N1 elements and list2 contains N2 elements. The first while loop is executed O(N1) times. The body of this loop takes O(N1) since GetNextItem takes O(1) and InsertItem takes O(N1). So, the complexity of the first loop is O(N1N1). The second while loop is executed O(N2) times. The body of that loop takes O(N1+N2) time since GetNextItem takes O(1), RetrieveItem takes O(log(N1+N2)) time (i.e., using BinarySearch) and InsertItem takes O(N1+N2) time. So, the complexity of the second loop is O(N2 x(N1+N2)). Overall, the running time of MergeList is the max between the two loops: O(max(N1 x N1, N2 x (N1+N2)).

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

CS 251 Data Analysis and Visualization , Spring 2010

This course prepares students to apply computational approaches to data analysis and visualization to real information from a variety of disciplines and applications. Data visualization is the interactive visual exploration of information using 2-D and 3-D graphics using techniques that highlight patterns and relationships. Data analysis incorporates data management, data transformations, stati...

متن کامل

Influence of development stage of spring oilseed rape and spring

10 The dry and wet deposition of radionuclides released into the atmosphere can be 11 intercepted by vegetation in terrestrial ecosystems. The aim of this study was to quantify the 12 interception of wet deposited Cs and Sr by spring oilseed rape (Brassíca napus L.) and 13 spring wheat (Tríticum aestívum L.). The dependency of the intercepted fraction (f) on total 14 above ground plant biomass,...

متن کامل

Glass transition and fragility in the simple molecular glassformer CS(2) from CS(2)-S(2)Cl(2) solution studies.

With an interest in finding the fragility for a simple, single component, molecular glassformer, we have determined the dielectric relaxation and glass transition behavior for a series of glasses in the CS(2)-S(2)Cl(2) and CS(2)-toluene systems. Crystallization of CS(2) can be completely avoided down to the composition 20 mol% second component, and the fragility proves almost independent of CS(...

متن کامل

Genetic Invariance � A New Paradigm for Genetic Algorithm Design

This paper presents some experimental results and analyses of the gene invariant genetic algorithm GIGA Although a subclass of the class of genetic algorithms this algorithm and its variations represent a unique approach with many interesting results The primary distin guishing feature is that when a pair of o spring are created and chosen as worthy of membership in the population they replace ...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

برای دانلود متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2010